<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="/static/common/layui/css/layui.css"  media="all">
  <link rel="stylesheet" href="/static/common/font-awesome/css/font-awesome.min.css" media="all" />
  <link rel="stylesheet" href="/static/admin/css/admin.css"  media="all">
  <style type="text/css">

/* tooltip */
#tooltip{
  position:absolute;
  border:1px solid #ccc;
  background:#333;
  padding:2px;
  display:none;
  color:#fff;
}
</style>
</head>
<body style="padding:10px;">
  <div class="tplay-body-div">
    <table class="layui-table" lay-size="sm">
      <colgroup>
        <col width="100">
        <col width="100">
        <col width="100">
        <col width="100">
        <col width="100">
        <col width="100">
        <col width="100">
      </colgroup>
      <thead>
        <tr>
          <th>姓名</th>
          <th>提现账户</th>
          <th>提现银行</th>
          <th>提现金额</th>
          <th>提现状态</th>
          <th>提现时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        {volist name="tixian" id="vo"}
        <tr>
          <td>{$vo.user.txname}</td>
          <td>{$vo.user.txzhanghu}</td>
          <td>{$vo.user.txyinhang}</td>
          <td>{$vo.price}</td>
          <td>
            {if condition="$vo['starts'] eq 1" /}
            <span class="layui-badge layui-bg-orange">正在处理</span>
            {elseif condition="$vo['starts'] eq 2" /}
            <span class="layui-badge">提现完成</span>
            {else /}
            <span class="layui-badge layui-bg-gray">提现失败</span>
            {/if}
          </td>
          <td>{$vo.create_time|date="Y-m-d H:i:s"}</td>
          <td class="operation-menu">
            <div class="layui-btn-group">
                <a class="layui-btn layui-btn-xs open layui-btn-primary" data-id="{$vo.id}" style="margin-right: 0;font-size:12px;"><i class="fa {if condition="$vo.starts eq 2"}fa-toggle-on{else/}fa-toggle-off{/if}"></i></a>
              <a class="layui-btn layui-btn-xs layui-btn-primary delete" id="{$vo.id}" style="margin-right: 0;font-size:12px;"><i class="layui-icon"></i></a>
            </div>
          </td>
        </tr>
        {/volist}
      </tbody>
    </table>
    <div style="padding:0 20px;">{$tixian|raw}</div>

    {include file="public/foot"}
    <script type="text/javascript">
      layui.use('layer', function(){
        var layer = layui.layer;
        $('.open').click(function(){
          var id = $(this).attr('data-id');
          layer.msg('文件审核',{
            time:20000
            ,btn: ['提现完成', '提现失败', '正在处理']
            ,yes: function(index, layero){
              $.ajax({
                url:"{:url('admin/Tixian/status')}"
                ,type:'post'
                ,data:{id:id,status:'2'}
                ,success:function(res){
                  layer.msg(res.msg);
                  if(res.code == 1){
                    setTimeout(function(){
                      location.href = res.url;
                    },1500)
                  }
                }
              })
            }
            ,btn2: function(index, layero){
              $.ajax({
                url:"{:url('admin/Tixian/status')}"
                ,type:'post'
                ,data:{id:id,status:'3'}
                ,success:function(res){
                  layer.msg(res.msg);
                  if(res.code == 1){
                    setTimeout(function(){
                      location.href = res.url;
                    },1500)
                  }
                }
              })
            }
          })
        })
      });              
    </script>
    
    <script type="text/javascript">
      $('.delete').click(function(){
        var id = $(this).attr('id');
        layer.confirm('确定要删除?', function(index) {
          $.ajax({
            url:"{:url('admin/tixian/del')}",
            data:{id:id},
            success:function(res) {
              layer.msg(res.msg);
              if(res.code == 1) {
                setTimeout(function(){
                  location.href = res.url;
                },1500)
              }
            }
          })
        })
      })
    </script>
  </div>
</body>
</html>
